/**
 * Copyright (c) 2016-2019, Michael Yang 杨福海 (fuhai999@gmail.com).
 * <p>
 * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl-3.0.txt
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.jpress.module.custom.controller;

import io.jboot.web.controller.annotation.RequestMapping;
import io.jpress.JPressConsts;
import io.jpress.core.menu.annotation.AdminMenu;
import io.jpress.web.base.AdminControllerBase;



@RequestMapping(value = "/admin/manage", viewPath = JPressConsts.DEFAULT_ADMIN_VIEW)
public class _ManageController extends AdminControllerBase {

    @AdminMenu(text = "代言家庭管理", groupId = "manage", order = 1)
    public void index() {
        render("custom/endorsement.html");
    }

    @AdminMenu(text = "抖音线路管理", groupId = "manage", order = 2)
    public void index1() {
        render("custom/douyin.html");
    }

    @AdminMenu(text = "淘山货大市地点数据管理", groupId = "manage", order = 3)
    public void site() {
        render("custom/bazaar.html");
    }

    @AdminMenu(text = "田园餐桌地点数据管理", groupId = "manage", order = 4)
    public void site1() {
        render("custom/rural.html");
    }

    @AdminMenu(text = "精品民宿地点数据管理", groupId = "manage", order = 5)
    public void site2() {
        render("custom/travel.html");
    }

    public void updateDouyin(){
        Integer id = Integer.valueOf(getPara("id"));
        setAttr("id", id);
        render("custom/douyinupdate.html");
    }

    public void addDouyin(){
        String eid = getPara("eid");
        setAttr("eid", eid);
        render("custom/douyinadd.html");
    }

    public void siteList(){
        String num = getPara("num");
        setAttr("num", num);
        render("custom/siteList.html");
    }

    public void updateHome(){
        Integer id = Integer.valueOf(getPara("id"));
        setAttr("id", id);
        render("custom/endorsementUpdate.html");
    }

    public void addHome(){
        String eid = getPara("eid");
        setAttr("eid", eid);
        render("custom/endorsementAdd.html");
    }

    public void updateSite(){
        Integer id = Integer.valueOf(getPara("id"));
        setAttr("id", id);
        render("custom/travelUpdate.html");
    }

    public void addSite(){
        String eid = getPara("eid");
        setAttr("eid", eid);
        render("custom/travelAdd.html");
    }

    public void fileList(){
        render("custom/file.html");
    }

    public void updateProductSite(){
        Integer id = Integer.valueOf(getPara("id"));
        setAttr("id", id);
        render("custom/bazaarupdate.html");
    }

    public void addProductSite(){
        String eid = getPara("eid");
        setAttr("eid", eid);
        render("custom/bazaaradd.html");
    }

    public void updateRural(){
        Integer id = Integer.valueOf(getPara("id"));
        setAttr("id", id);
        render("custom/ruralupdate.html");
    }

    public void addRuRal(){
        String eid = getPara("eid");
        setAttr("eid", eid);
        render("custom/ruraladd.html");
    }

}
